abstract public class Animal {
    public String name;

    public Animal(String name) {
        this.name = name;
    }
}

interface IRunning{
    void run();
}

interface IFlying{
    void fly();
}

interface ISwimming{
    void swim();
}

class Dog extends Animal implements IRunning{
    public Dog(String name) {
        super(name);
    }

    @Override
    public void run() {
        System.out.println(this.name + "正在跑步！");
    }
}

class Duck extends Animal implements IRunning,IFlying,ISwimming{
    public Duck(String name) {
        super(name);
    }

    @Override
    public void run() {
        System.out.println(this.name + "正撒丫子飞奔");
    }

    @Override
    public void fly() {
        System.out.println(this.name + "在飞~");
    }

    @Override
    public void swim() {
        System.out.println(this.name + "在游泳~");
    }
}

class Robot implements IRunning{
    public String name;

    public Robot(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        System.out.println(this.name + "机器人在跑步");
    }
}